package com.fc.mall.service;

import com.fc.mall.dto.SmsBargainPromotionProduct;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 砍价活动与砍价管理Service
 * Created by charles on 2019/9/7
 */
public interface SmsBargainPromotionProductService {
    /**
     * 添加砍价活动
     */
    @Transactional
    int create(SmsBargainPromotionProduct bargainPromotionProduct);

    /**
     * 根据id删除砍价活动产品映射
     */
    @Transactional
    int delete(Long id);

    /**
     * 根据id更新砍价活动与产品映射信息
     */
    @Transactional
    int update(Long id, SmsBargainPromotionProduct bargainPromotionProduct);

    /**
     * 分页获取砍价产品列表
     */
    List<SmsBargainPromotionProduct> list(Long promotionId, Integer pageSize, Integer pageNum);

    /**
     * 获取砍价活动详情
     * @param id 砍价活动表id
     */
    SmsBargainPromotionProduct getBargainPromotionProduct(Long id);

}
